import React from 'react'
export default class Child extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      count: 0
    }
  }

  componentWillMount () {
    console.log('willMount')
  }

  componentDidMount () {
    console.log('didMount')
  }

  componentWillReceiveProps (newProps) {
    console.log('willReceiveProps', newProps)
  }
  shouldComponentUpdate () {
    console.log('shouldComponentUpdate')
    return true
  }
  componentWillUpdate () {
    console.log('will update')
  }
  componentDidUpdate () {
    console.log('did update')
  }
  render () {
    return  <div>
      <p>{this.props.name}</p>
    </div>
  }

}